package edu.hunau.cxb19.oop.class06.statics;

import org.junit.Test;

/**
 *
 * @author hb
 *
 *         2020-03-02 15:17:06
 */
public class StaticBlockTest {
	@Test	
	public void call() {
		new Child();
		System.out.println("-------------");
		new Child();
	}
}

class Paren {
	static {
		System.out.println("Paren#静态代码块");
	}
	
	{
		System.out.println("Paren的非静态块...");
	}

	public Paren() {
		System.out.println("Paren的构造器。。。");
	}
}

class Child extends Paren {
	static {
		System.out.println("Child#静态代码块");
	}
	

	{
		System.out.println("child的非静态块...");
	}

	public Child() {
		System.out.println("Child的构造器。。。");
	}
}
